package com.ruoyi.system.controller;

    import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.ZoneId;

    public class DayOfWeekDemo {

        public static void main(String[] args) {
            // 获取当前日期
            LocalDate today = LocalDate.now(ZoneId.systemDefault());

            // 获取当前日期是周几
            DayOfWeek dayOfWeek = today.getDayOfWeek();

            // 输出结果
            System.out.println("Today is: " + dayOfWeek);
        }
    }


